#region Imported Namespaces
using System;
using System.Xml;
using System.Xml.Serialization;
#endregion

namespace PHSRAG.Insight21.FormsManagement.Serialization
{
	#region Class FormAnswer
	/// <summary>
	/// FormAnswer class objects are used to hold answers for a FormItem 
	/// </summary>
	public class FormAnswer : System.ICloneable
	{
		#region Private instance fields
		[NonSerialized]
		private int id;
		private bool deleted;
		private bool selected;
		private string answer = string.Empty;
		#endregion
		
		#region Properties
		/// <summary>
		/// Gets or sets the id as in its corresponding Answer object
		/// </summary>
		
		public int Id
		{
			get { return id; }
			set { id = value; }
		}

		/// <summary>
		/// Gets or sets whether or not the answer is deleted
		/// </summary>
		public bool Deleted
		{
			get { return deleted; }
			set { deleted = value; }
		}

		/// <summary>
		/// Gets or sets whether or not the answer is selected
		/// </summary>
		public bool Selected
		{
			get { return selected; }
			set { selected = value; }
		}

		/// <summary>
		/// Gets or sets the answer
		/// </summary>
		public string Answer
		{
			get { return answer; }
			set { answer = value; }
		}
		#endregion

		#region Constructors
		/// <summary>
		/// Default Constructor required while serializing the object
		/// </summary>
		public FormAnswer()
		{
		}
		#endregion

		#region ICloneable Members
		/// <summary>
		/// Explicit interface method implementation - available for 
		/// clients of ICloneable, but invisible to other
		/// clients of FormAnswer class
		/// </summary>
		/// <returns>FormAnswer clone as a generic object</returns>
		object ICloneable.Clone()
		{
			return Clone();
		}

		
		/// <summary>
		/// Deep Copies the FormAnswer object
		/// </summary>
		/// <returns>A clone of the current FormAnswer</returns>
		public FormAnswer Clone()
		{
			return (FormAnswer)MemberwiseClone();
		}
		#endregion
	}
	#endregion
}
